package org.webball.base.interfaces;

import java.io.Serializable;

/**
 * Interface provides methods used in text communication 
 * @author Marcin Kaczor
 *
 */
public interface IMessage extends Serializable{

	//Message consts 
	static final String START = "/start:";
	static final String WHISPER = "/whisper:";
	static final String LOGIN = "/login:";
	static final String CLOSE = "/close:";
	/**
	 * copies content of <code>msg</code> to specified message
	 * @param msg
	 */
	void copy(IMessage msg);
	/**
	 * sets content of message
	 * @param text
	 */
	void setText(String text);
	/**
	 * gets content of message
	 * @return
	 */
	String getText();
	/**
	 *clears content of message, it's set to empty
	 */
	void clear();
}
